#ifndef _CIRCLE_H_H_
#define _CIRCLE_H_H_

#include "PointH.h"
#include "RectangleH.h"
#include <iostream>
#include <Windows.h>
#include "ScreenH.h"
#include "Shape.h"
#include <math.h>
using namespace std;

void gotoxy(int, int);

class Circle: public Shape
{
	//If Adding Data members, Please remember to update the operator assignment "="
	int m_Radius;
	Point m_center;
	char m_symb;
	
	//void draw(int option, Screen * s);

public:	

    Circle()
	{
	   init();
	}
	Circle(const Circle& copyObj) { *this = copyObj; }; //Copy Constructor

	Circle& operator=(const Circle& copyObj);

	void init();

	void getPos(int &x, int &y);

	void setPos(int x, int y);

	void getSize(int &x);

	void setSize(int x);

	void draw(int drawingOption = 1, Screen * s = NULL);

	void draw1(int drawingOption = 1, Screen * s = NULL);

	void draw2(int drawingOption = 1, Screen * s = NULL);

	void drawPoints8(int circleX, int circleY, int x, int y, int drawingOption, Screen * s);

	void drawPoints4(int circleX, int circleY, int x, int y, int drawingOption, Screen * s);

	bool isInScreen(int x, int y);

	void getCirclePoints(Point &p1, Point &p2, Point &p3, Point &p4);

	void getCirclePoints4(Point &p1, Point &p2, Point &p3, Point &p4);

    bool isDirectionsResetBorders();

	bool isDirectionsResetBordersCirclesPerPoint(Circle * c, Point p);

	bool isContain(Circle * c2);
	
    bool isOverlap(Circle * c2);

	bool getHitPoint(Circle * c2, Point &pHit);

	void get8Points(int CircleX, int CircleY, int x, int y, Point &p1, Point &p2, Point &p3, Point &p4);

	void get4Points(int CircleX, int CircleY, int x, int y, Point &p1, Point &p2, Point &p3, Point &p4);

	bool isPointEqual4Points(Point pCheck, Point p1, Point p2, Point p3, Point p4);

	bool isPointInCircleEnvelop(const Point &p1, Circle * c2);

	bool isXaxis(Point p);

	bool isYaxis(Point p);

	bool isPointIn(int x, int y);
};


#endif